﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
using System.Xml.Serialization;

namespace SimpleRest.Core.Extensions.OAuth
{
    /// <summary>
    /// http://tools.ietf.org/html/rfc6749#section-4.1.3
    /// http://tools.ietf.org/html/rfc6749#section-4.3.2
    /// http://tools.ietf.org/html/rfc6749#section-6
    /// http://tools.ietf.org/html/rfc6749#section-2.3.1
    /// </summary>
    public class AccessTokenRequest
    {
        public string grant_type { get; set; }
        public string code { get; set; }
        public string redirect_uri { get; set; }
        public string client_id { get; set; }
        public string username { get; set; }
        public string password { get; set; }
        public string refresh_token { get; set; }
        public string scope { get; set; }
        /// <summary>
        /// Required if the grant_type is "refresh_token" and the client's secret key is
        /// also required to refresh the access token.  http://tools.ietf.org/html/rfc6749#section-2.3.1
        /// </summary>
        public string client_secret { get; set; }
    }
}
